// src/api/refunds.js
import axios from 'axios'

const API_URL = "http://localhost:8080/app/refunds"

/**
 * 发起退款
 * @param {Object} payload - 退款参数
 * @param {string} token - 幂等 token
 * @returns {Promise}
 */
export function refundOrder(payload, token) {
    return axios.post(`${API_URL}/refund`, payload, {
        headers: {
            formToken: token // 携带幂等 token
        },
    })
}
